<div class="login">
  <form method="post" class="form-horizontal" role="form" name="loginForm" ng-submit="login(user)" novalidate>
    <!-- <div class="form-group">
      <div class="col-xs-12 col-md-9">
        <img src="http://112.74.15.191/logo_big.jpg" alt="" height="60" id="logo">
      </div>
    </div> -->
    <div class="form-group">
      <div class="col-xs-12 col-md-9">
        <h3>茶科技 - 小茶馆</h3>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error': loginForm.userName.$invalid && loginForm.userName.$dirty}">
      <div class="col-xs-12 col-md-9">
        <div class="input-group">
          <span class="input-group-addon"><i class="fa fa-user"/></span>
          <input type="userName" name="userName" class="form-control" placeholder="用户名" ng-model="user.userName" required>
        </div>
      </div>
      <div class="hidden-xs col-md-3 error" ng-show="loginForm.userName.$dirty && loginForm.userName.$invalid">
        <span class="text-danger" ng-show="loginForm.userName.$error.required">请输入用户名</span>
      </div>
    </div>

    <div class="form-group" ng-class="{'has-error': loginForm.password.$invalid && loginForm.password.$dirty}">
      <div class="col-xs-12 col-md-9">
        <div class="input-group">
          <span class="input-group-addon"><i class="fa fa-lock"/></span>       
          <input type="password" name="password" class="form-control" placeholder="用户密码" ng-model="user.password" required>
        </div>
      </div>
      <div class="hidden-xs col-md-3 error" ng-show="loginForm.password.$dirty && loginForm.password.$invalid">
        <span class="text-danger" ng-show="loginForm.password.$error.required">请输入用户密码</span>
      </div>
    </div>

    <div class="form-group">
      <div class="col-xs-12 col-md-9 text-left">
        <input type="checkbox" class="form-control" icheck name="remember" ng-model="user.remember">&nbsp;自动登录
        <!-- <a href="javascript:void(0)" class="pull-right" ng-click="forgetPwd()">忘记密码</a> -->
      </div>
    </div>

    <div class="form-group">
      <div class="col-xs-12 col-md-9">
        <button class="btn btn-primary btn-lg btn-block" type="submit" ng-disabled="loginForm.$invalid">登录</button>
        <div class="text-danger text-left" ng-if="formOption.error" ng-bind="formOption.error"></div>
        <!-- <br/>
        <p>还没有账户？</p>
        <a href="javascript:void(0)" ng-click="signUp()" class="btn btn-default-outline btn-block">立即注册</a> -->
      </div>
    </div>
  </form>
</div>